-
Notifications
You must be signed in to change notification settings - Fork 86
Use symlink for output_template/python/lmnet/utils/output.py #688
Use symlink for output_template/python/lmnet/utils/output.py #688
Conversation
This PR needs Approvals as follows.
Please choose reviewers and requet reviews! Click to see how to approve each reviewsYou can approve this PR by triggered comments as follows.
See all trigger commentsPlease replace [Target] to review target
|
Please put me back after ownership review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ownership Approval
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need these diffs in predict_output/output.py
in order to replace output_template/.../output.py
with a symlink?
@tsawada , Thanks!
So I synchronized it manually. |
@@ -35,12 +34,13 @@ class JsonOutput(): | |||
Please see [Output Data Specification](https://github.com/LeapMind/lmnet/wiki/Output-Data-Specification). | |||
""" | |||
|
|||
def __init__(self, task, classes, image_size, data_format): | |||
def __init__(self, task, classes, image_size, data_format, bench={}): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use mutable object as an argument's default value
http://go/python-review-guidelines#using-listdict-as-the-default-arg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it is reasonable. Fixed.
from io import BytesIO | ||
|
||
import numpy as np | ||
import PIL.Image | ||
import PIL.ImageDraw | ||
from matplotlib import cm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove matplotlib
from requirements.txt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this PR, only lmnet/networks/classification/base.py
will depend on matplotlib
.
from matplotlib import cm |
Is it worth adding a new dependency for visualization? If not, I would remove it in another PR and reimplement this.
Related to: #485
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I think it'd be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Readability Approval
from io import BytesIO | ||
|
||
import numpy as np | ||
import PIL.Image | ||
import PIL.ImageDraw | ||
from matplotlib import cm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I think it'd be nice.
Related to: #684 .
Motivation and Context
Description
How has this been tested?
Screenshots (if appropriate):
Types of changes
Checklist: